/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-01-15     Wangjiangbo       the first version
 */
#ifndef __MOD_CIA402DEV_H__
#define __MOD_CIA402DEV_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include "bsp/bsp.h"

#define CIA402_VEL_MODE     3
#define CIA402_POS_MODE     1

bool cia402_switch_on(int8_t id);

bool cia402_enable(int8_t id);

bool cia402_disable(int8_t id);

bool cia402_set_mode(int8_t id, uint8_t mode);

bool cia402_set_vel(int8_t id, int32_t vel);

bool cia402_set_output(int8_t id, uint16_t value);

#ifdef __cplusplus
}
#endif /* __cplusplus */


#endif /* APPLICATIONS_APP_APP_MOTORCONTROL_H_ */


